#ifndef _OI_FLANGEXPRODUCTDIALOG_HPP_
#define _OI_FLANGEXPRODUCTDIALOG_HPP_

#include "Appl/OiAppl.hpp"

namespace Oi { namespace Appl {

    class FlangeXProductDialog : public Ctrl::Dialog
    {
        Q_OBJECT
    public:
        FlangeXProductDialog(const QString& root, QWidget* parent = NULL);
        ~FlangeXProductDialog();

    public:
        QString root() const;

        QString current() const;

        void setCurrent(const QString& product);

    public:
        void refresh();

    signals:
        void appendProject();
        void modifyProject(const QString&);
        void deleteProject(const QString&);

    public slots:
        void accept();
        void reject();

        void onCurrentRowChanged(int);
        void onProductItemDoubleClicked(QListWidgetItem*);
        void onAppendProduct();
        void onModifyProduct();
        void onDeleteProduct();

    private:
        OI_DISABLE_COPY(FlangeXProductDialog);
        OI_DECLARE_IMPL(FlangeXProductDialog);
    };

} }

#endif
